<?php
include_once "db.php";
include_once "checksession.php"; 
$types = mysql_query("select * FROM helpdesk_users");
$user_query = mysql_query("select * from helpdesk_users where HD_user_ID = $_SESSION[ID]");
$hduser = mysql_fetch_array($user_query);
		$name = $hduser[name];
		$email =  $hduser[email];
		$username = $hduser[username];
		$password = $hduser[password];
		$status = $hduser[status];


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Modify Helpdesk Users</title>
<link href="meta-style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
include_once "topnav.php";
?>
<p class="title">Your User Account</p>
<form action="update_user.php" method="post">
<input type="hidden" name="userid" value="<? echo $_SESSION[ID]; ?>">
<table width="600" border="0" cellspacing="2" cellpadding="2">
<tr>
<td colspan="6" bgcolor="#999999"><strong>Edit your Info:</strong></td>
</tr>
  <tr>
    <td width="129" align="right">Name:</td>
	<td width="129" align="left"> <?php echo $name; ?></td>
	<td width="129" align="right">Username:	</td>
	<td width="130" align="left"><?php echo $username; ?>  </td>
  </tr>
	<tr>
	<td align="right">Email:</td>
	<td align="left"><input name="email" type="TEXT" id="email" value="<?php echo $email; ?>" size="35"></td>
	<td align="right">Password: </td>
    <td align="left"><INPUT NAME="password" TYPE="password" id="password" value="<?php echo $password; ?>" SIZE="35"></td>
	</tr>
	<tr>
	<td align="right">User Type: </td> 
	<td align="left"> <?php echo $status; ?></td>
	<td colspan="2" align="right">Admin=1, User=2</td>
    </tr>
</table>
<br/>
<input type=SUBMIT value="Update Info!" name="SUBMIT">
</form>
<p><a href="index.php">Back to Main Menu</a></p>
</body>
</html>
